<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    {{ msg }}
    {{ act() }}
    {{ isShow?'这姑娘真漂亮':'这姑娘真懒' }}
    <!-- {{ data }} -->
    <!-- {{ alert(1) }} -->
    {{ parseFloat('1.2345.678') }}
  </div>
  <script src="./vue.js"></script>
  <script>
    const data ="你好世界"
    const vm = new Vue({
      el:"#app",
      data:{
        msg:"你好vue",
        msg2:"hello vue",
        isShow: false
      },
      methods:{
        act(){
          console.log(11);
          return 111
        },
        act2(){
          console.log(22)
        }
      }
    })

    console.log(vm)
    document.onclick=function(){
     
      vm.msg = "数据改变啦"
    }
    /* function P(params = {}){
      for(var key in params.data){
        this[key] = params.data[key]
      }
    }

    const p = new P({
      data:{
        a:10,
        b:20
      }
    })
      console.log(p)
     */

  
  </script>
</body>
</html>